home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / science / sm32a.zip / LIBRARY / ISMEMBER.LI < prev    next >
Text File  |  1993-12-27  |  209b  |  7 lines

  1. #  ismember(f,x) tests if x is a member of a list of f.
  2. ismember(f_, x_) := if( islist(f),
  3.     block( j:=0, p:=0,
  4.     repeat( j:=j+1, if(member(f,j)== x, p:=1),  p==1 or j >= length(f)),
  5.     p,
  6.     local(j,p) ), 0)
  7.